// logs.js
// const util = require('../../utils/util.js')
const server = require('../../utils/server.js')
Page({
  data: {
    xian:'苍南县',
    xianList: ['苍南县', '平阳县'],
    zhen:'灵溪镇',
    zhenList: ['灵溪镇','钱库镇','宜山镇'],
    shequ:'宜一社区',
    shequList: ['宜一社区','玉和社区'],
    list:[]
  },
  onLoad() {
    
  },
  onShow(){
    let ndata=wx.getStorageSync('nData');
    let nn=[];

    let user=server.getUserToken().name;
    ndata.forEach((e)=>{
      nn.push({
        name:e.address1+e.address2,
        nname:e.name,
        status:e.status,
        checkUser:user
      })
    });
    this.setData({
      list:nn
    })
  },
  toBottom: function(e) {
    console.log('滚动到底部',e)
  },
  bindXianChange: function(e) {
    console.log('e.detail.value',e.detail.value)
    this.setData({
      xian: this.data.xianList[e.detail.value]
    })
  },
  bindZhenChange: function(e) {
    console.log('e.detail.value',e.detail.value)
    this.setData({
      zhen: this.data.zhenList[e.detail.value]
    })
  },
  bindShequChange: function(e) {
    console.log('e.detail.value',e.detail.value)
    this.setData({
      shequ: this.data.shequList[e.detail.value]
    })
  },
})
